home *** CD-ROM | disk | FTP | other *** search
/ Go Ronald / Go Ronald Voice Interactive CD.iso / Data1.cab / _A78B221671294700924B8ABD93D36F0B / scripts / frame_6 / DoAction.as
Text File  |  2005-08-05  |  1KB  |  45 lines

  1. stop();
  2. var randSnd_arr = new Array("cooltrick","greatmove","awesome");
  3. this.createEmptyMovieClip("fx_mc",this.getNextHighestDepth());
  4. var voiceover_snd = new Sound("fx_mc");
  5. goronald_mc._visible = true;
  6. startover_mc._visible = true;
  7. goronald_mc.onRelease = function()
  8. {
  9.    dnaGRG_so.data.fromModule = "true";
  10.    dnaGRG_so.flush();
  11.    _root.loadNextMovie("MainMenuLauncher.swf");
  12. };
  13. goronald_mc.onRollOver = function()
  14. {
  15.    this.gotoAndPlay("rollover");
  16. };
  17. goronald_mc.onRollOut = function()
  18. {
  19.    this.gotoAndPlay("rollout");
  20. };
  21. startover_mc.onRelease = function()
  22. {
  23.    clickSound.start();
  24.    gotoAndStop("Ready");
  25.    play();
  26. };
  27. startover_mc.onRollOver = function()
  28. {
  29.    redoSound.start();
  30.    this.gotoAndPlay("rollover");
  31. };
  32. mApplication.trace("userScore at the end = " + userScore);
  33. if(userScore == 200)
  34. {
  35.    voiceover_snd.attachSound("perfect");
  36.    voiceover_snd.start();
  37. }
  38. else
  39. {
  40.    x = Math.round(Math.random() * 2);
  41.    mApplication.trace("x = " + x);
  42.    voiceover_snd.attachSound(randSnd_arr[x]);
  43.    voiceover_snd.start();
  44. }
  45.